import request from '@/utils/request'

/**
 * plc信息分页查询
 * @param {查询条件} data
 */
export function pageBasePlc(query) {
	return request({
		url: 'BaseManage/BasePlc/pageList',
		method: 'get',
		params: query,
	})
}

/**
 * plc信息查询
 * @param {查询条件} data
 */
export function listBasePlc(query) {
	return request({
		url: 'BaseManage/BasePlc/list',
		method: 'get',
		params: query,
	})
}

/**
 * 新增plc信息
 * @param data
 */
export function addBasePlc(data) {
	return request({
		url: 'BaseManage/BasePlc',
		method: 'post',
		data: data,
	})
}
/**
 * 修改plc信息
 * @param data
 */
export function updateBasePlc(data) {
	return request({
		url: 'BaseManage/BasePlc',
		method: 'PUT',
		data: data,
	})
}
/**
 * 获取plc信息详情
 * @param {Id}
 */
export function getBasePlc(id) {
	return request({
		url: 'BaseManage/BasePlc/' + id,
		method: 'get'
	})
}

/**
 * 删除plc信息
 * @param {主键} pid
 */
export function delBasePlc(pid) {
	return request({
		url: 'BaseManage/BasePlc/delete',
		method: 'POST',
		data: pid
	})
}
